<% title t('strategies.plural') %>
<% page_new new_strategy_path %>
<div class="subtitle">
  <%= t('strategies.index.subtitle') %>
</div>

<% if @strategies.any? %>
  <%= render partial: '/search/posts', locals: { data_type: 'strategy' } %>
  <%= render partial: '/shared/stats', locals: { data_type: 'strategies', user: current_user } %>
  <%= react_component('BaseContainer', props: {
    container: 'StoryContainer',
    data: moments_or_strategy_props(@strategies),
    fetchUrl: strategies_path,
    lastPage: @strategies.last_page?
  })%>
<% else %>
  <%= raw t('strategies.index.instructions') %>
  <%= button_to t('common.actions.add'), premade_strategies_path, class: 'smallMarginTop buttonDarkS' %>
  <div class="gridTwo marginTop">
    <div class="gridTwoItemBoxLight">
      <%= react_component('Story', html_options: html_options, props: {
        name: t('strategies.index.premade1_name'),
        actions: {
          viewers: t('comment.control')
        }
      }) %>
    </div>
  </div>
<% end %>
